package com.sc.nft.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sc.nft.enums.*;
import com.sc.nft.sup.SuperEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 订单分账记录
 * </p>
 *
 * @author PC
 * @since 2024-10-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sc_order_split_flow")
public class OrderSplitFlow extends SuperEntity<OrderSplitFlow> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 结算单id
     */
    @TableField("order_account_id")
    private Long orderAccountId;

    /**
     * 支付单id-快照字段方便分账
     */
    @TableField("pay_order_id")
    private Long payOrderId;

    /**
     * 字符单号-快照字段方便分账
     */
    @TableField("pay_no")
    private String payNo;

    /**
     * 二级订单号
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 分账单号
     */
    @TableField("split_no")
    private String splitNo;

    /**
     * 业务类型 1-藏品 2-道具
     * @see BizTypeEnum
     */
    @TableField("biz_type")
    private BizTypeEnum bizType;

    /**
     * 结算金额
     */
    @TableField("settle_amount")
    private BigDecimal settleAmount;

    /**
     * 支付渠道
     * @see PayChannelEnum
     */
    @TableField("pay_channel")
    private PayChannelEnum payChannel;

    /**
     * 三方分账业务流水号
     */
    @TableField("trans_id")
    private String transId;

    /**
     * 用户类型 MERCHANT/USER
     * @see SettleUserTypeEnum
     */
    @TableField("user_type")
    private SettleUserTypeEnum userType;

    /**
     * 订单总金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;


    /**
     * 分账方式
     */
    @TableField("split_type")
    private SplitTypeEnum splitType;


    @TableField("finish_time")
    private Date finishTime;

    @TableField("split_status")
    private SplitStatusEnum splitStatus;


    @TableField("resp_code")
    private String respCode;

    @TableField("resp_desc")
    private String respDesc;

    @TableField("req_params")
    private String reqParams;




}
